package com.heima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.heima.pojo.Partner;
import com.heima.pojo.dto.PageQueryDTO;
import com.heima.pojo.vo.PartnerVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface PartnerMapper extends BaseMapper<Partner> {

    Page<PartnerVo> queryParener(PageQueryDTO dto);

    @Select("select count(*) from tb_partner")
    Integer partnerCount();

    @Update("update tb_partner set password = #{password} where id = #{id}")
    Integer resetPwd(Integer id,String password);
}
